package com.dl.config.jwt;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author DL
 * @create 2021-06-15 11:23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseResponse implements Serializable {

    public static final Integer NO_LOGIN_CODE = 0;
    public static final String NO_LOGIN_MESSAGE = "没有登录，请先登录";

    public static final Integer LOGIN_SUCCESS_CODE = 1;
    public static final String LOGIN_SUCCESS_MESSAGE = "登录成功";

    public static final Integer LOGIN_FAILURE_CODE = 2;
    public static final String LOGIN_FAILURE_MESSAGE = "登录失败";

    public static final Integer NO_PERMS_CODE = 3;
    public static final String NO_PERMS_MESSAGE = "用户权限不足";

    public static final Integer NO_ROLE_CODE = 4;
    public static final String NO_ROLE_MESSAGE = "用户角色不符";

    private static final long serialVersionUID = 1L;

    private Integer code;
    private String msg;
    private String date;

    public BaseResponse(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
